package com.ecoolex.chinadutyfree.retailer.ws;

import java.util.List;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.chinadutyfree.retailer.core.manager.TaxRateManager;
import com.ecoolex.chinadutyfree.retailer.entity.TaxRate;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryTaxRateDTO;
import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;

@Service
public class TaxRateServiceImpl implements TaxRateService{
	
	@Autowired
	private TaxRateManager taxRateManager;

	@Override
	public TaxRate getTaxRate(Integer taxRateId) {
		return taxRateManager.getTaxRate(taxRateId);
	}

	@Override
	public Pagination<TaxRate> queryTaxRate(QueryTaxRateDTO query, Sorting[] sorts, Page page) {
		return taxRateManager.queryTaxRate(query, sorts, page);
	}

	@Override
	public List<TaxRate> listByLastTaxRateId(Integer lastTaxRateId) {
		return taxRateManager.listByLastTaxRateId(lastTaxRateId);
	}
	
	@Override
	public TaxRate addTaxRate(TaxRate record, String createUser) throws BizException {
		return taxRateManager.addTaxRate(record, createUser);
	}

	@Override
	public TaxRate editTaxRate(TaxRate record, String updateUser) throws BizException {
		return taxRateManager.editTaxRate(record, updateUser);
	}

	@Override
	public void deleteTaxRate(TaxRate record, String updateUser) throws BizException {
		taxRateManager.deleteTaxRate(record, updateUser);
	}

}
